#ifndef HISTREAMER_PLUGIN_INTF_AUDIO_SINK_PLUGIN_H
#define HISTREAMER_PLUGIN_INTF_AUDIO_SINK_PLUGIN_H

#include "plugin_base.h"
#include "plugin_definition.h"
#include "common/plugin_buffer.h"
#include "common/plugin_caps.h"

namespace OHOS {
namespace Multimedia {
namespace Plugin {
struct AudioSinkPlugin : public PluginBase {
    virtual Status GetMute(bool &mute) = 0;
    virtual Status SetMute(bool mute) = 0;
    virtual Status GetVolume(float &volume) = 0;
    virtual Status SetVolume(float volume) = 0;
    virtual Status GetSpeed(float &speed) = 0;
    virtual Status SetSpeed(float speed) = 0;
    virtual Status Pause() = 0;
    virtual Status Resume() = 0;
    virtual Status GetLatency(uint64_t &ms) = 0;
    virtual Status GetFrameSize(size_t &size) = 0;
    virtual Status GetFrameCount(uint32_t &count) = 0;
    virtual Status Write(const std::shared_ptr<Buffer> &input) = 0;
    virtual Status Flush() = 0;
};

#define AUDIO_SINK_API_VERSION_MAJOR (1)
#define AUDIO_SINK_API_VERSION_MINOR (0)
#define AUDIO_SINK_API_VERSION MAKE_VERSION(AUDIO_SINK_API_VERSION_MAJOR, AUDIO_SINK_API_VERSION_MINOR)

struct AudioSinkPluginDef : public PluginDefBase {
    CapabilitySet inCaps;
    PluginCreatorFunc<AudioSinkPlugin> creator;
    AudioSinkPluginDef() {
        apiVersion = AUDIO_SINK_API_VERSION;
        pluginType = PluginType::AUDIO_SINK;
    }
};

} // namespace Plugin
} // namespace Multimedia
} // namespace OHOS
#endif
